package com.qidian.by.free.repository;

import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Lazy;
import org.springframework.context.annotation.Primary;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.PathResource;
import org.springframework.core.io.Resource;
import org.springframework.core.io.ResourceLoader;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Repository;

import java.io.IOException;
import java.util.Properties;

/**
 * @Author: CoolPro
 * @Description:
 * @Time: 2024-05-16 19:21
 **/
@Repository
public class FreeTemplateConfig {
    @Value("${goods-item-page-template-path}")
    private String templatePath;
    @Value("${output-path}")
    private String outputPath;
    @Bean(name = "freeTemplateProperties")
    @Qualifier("freeTemplateProperties")
    public Properties freeTemplateProperties(){
        Properties properties = new Properties();
        properties.put("template_loader_path", templatePath);
        properties.put("output_path",outputPath);
        return properties;
    }
}
